// TOWN DIALOGUE SCRIPT
//    Town 12: Sweon

// This is the dialogue for this town.
// You can use states numbered from 1 to 199.

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode 1;
	state = -1;
	personality = 240;
	nextstate = 1;
	condition = 1;
	question = "Garmund";
	text1 = "Seated in a near crouch on the chair, this strange magician eyes you oddly.";
	text2 = "_Garmund, the wizard._";
	text5 = "Seated in a near crouch on the chair, this strange magician eyes you oddly.";	
	action = INTRO; // This line only does anything if the character has a personality set.

begintalknode 2;
	state = 1;
	personality = 240;
	nextstate = 2;
	condition = 1;
	question = "What is your job?";
	text1 = "_I am keeping something._";

begintalknode 3;
	state = 2;
	personality = 240;
	nextstate = 3;
	condition = 1;
	question = "Keeping";
	text1 = "_A piece of knowledge, one that cannot be divulged to such undecided persons such as you. It will remain hidden._";

begintalknode 4;
	state = 3;
	personality = 240;
	nextstate = 4;
	condition = 1;
	question = "Hidden";
	text1 = "_Seek for yourself, but do not ask from me what I hold, for it is dangerous. The less that know, the better the world would be. Is there aught else you would demand?_";

begintalknode 5;
	state = 4;
	personality = 240;
	nextstate = 5;
	condition = 1;
	question = "Else demand";
	text1 = "He sighs in resignation. _If you wish, I can teach you a valuable spell. But then leave me in peace._";

begintalknode 6;
	state = 5;
	personality = 240;
	nextstate = -1;
	condition = 1;
	question = "Spell";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("Garmund","This reclusive mage won't tell you what is on his mind but he will sell you this spell.",21,2,-1);
	break;

begintalknode 9;
	state = -1;
	personality = 241;
	nextstate = 11;
	condition = 1;
	question = "Hildeburh";
	text1 = "The innkeeper is working at a relatively leisurely pace.";
	text5 = "_I am Hildeburh._";
	action = INTRO;

begintalknode 10;
	state = 11;
	personality = 241;
	nextstate = 12;
	condition = 1;
	question = "What is your job?";
	text1 = "She frowns. _What else can I do? If you'd like a room, pay 20 gold for it. If you want a meal, 5._";

begintalknode 11;
	state = 12;
	personality = 241;
	nextstate = -1;
	condition = 1;
	question = "Room";
	text1 = "You are shown to a common room.";
	text3 = "_Well, as I said, it's 20 gold._";
	text5 = "You can't stay in an inn when on horseback.";
	action = INN 20 41 14;

begintalknode 12;
	state = 12;
	personality = 241;
	nextstate = 12;
	condition = 1;
	question = "Meal";
	text1 = "You are delivered some plain vegetable soup. If it's not appetizing, it's at least better than road rations.";
	text3 = "_Well, as I said, 5 gold._";
	action = PAY -1 -1 -1 5;

begintalknode 15;
	state = -1;
	personality = 242;
	nextstate = 21;
	condition = 1;
	question = "Wonred";
	text1 = "Kneeling at the altar, the priest of the temple is in silent prayer.";
	text2 = "He stands and turns to you. _I am called Wonred._";


begintalknode 16;
	state = 21;
	personality = 242;
	nextstate = 22;
	condition = 1;
	question = "What is your job?";
	text1 = "_Delivering the faith of the Eternal Fire._";

begintalknode 17;
	state = 22;
	personality = 242;
	nextstate = 23;
	condition = 1;
	question = "Faith of the Fire";
	text1 = "_The Eternal Fire burns at the heart of the world, the source for all that be. It sustains all that live and takes back all that die, healer and ravager at once._";

begintalknode 18;
	state = 23;
	personality = 242;
	nextstate = 24;
	condition = 1;
	question = "Sustains all that live";
	text1 = "_We are fed by the Eternal Fire, and it drives our hearts and our limbs._";

begintalknode 19;
	state = 23;
	personality = 242;
	nextstate = 23;
	condition = 1;
	question = "Take back";
	text1 = "_All that die turn to ashes, returning to the Fire from whence they are born._";

begintalknode 20;
	state = 24;
	personality = 242;
	nextstate = 25;
	condition = 1;
	question = "Heart of the world";
	text1 = "_Emotions are strong within us, and emotions drive all the purposes of the world._";

begintalknode 21;
	state = 24;
	personality = 242;
	nextstate = 24;
	condition = 1;
	question = "Limbs";
	text1 = "_As far as cold thought may carry us, the flame of action still must be evoked if anything is to be accomplished, built, or destroyed._";

begintalknode 22;
	state = 25;
	personality = 242;
	nextstate = -1;
	condition = 1;
	question = "Purposes of the world.";
	text1 = "_Beware, and serve the Eternal Fire, for only at the source of it all can you grasp what is true._";
	text2 = "He bows and turns back to the altar.";

begintalknode 23;
	state = 23;
	personality = 242;
	nextstate = 26;
	condition = 1;
	question = "Healer and ravager";
	text1 = "_I can, by the power of the Fire, mend certain wounds for a small price of purchase._";

begintalknode 24;
	state = 26;
	personality = 242;
	nextstate = 23;
	condition = 1;
	question = "Mend wounds";
	text1 = "Restoration of Fire";
	code =
	if (coins_amount() >= 300) {
	i = 0;
	while (i < 6) {
		restore_pc(i);
		change_coins(-50);
		i = i + 1;
	}
}	
	else 	message_dialog(" _I must insist upon the payment fair_","");
	break;

begintalknode 27;
	state = -1;
	personality = 243;
	nextstate = 31;
	condition = 1;
	question = "Hraedla";
	text1 = "Seated at the table, this swordsman smells of horses.";
	text2 = "_Hraedla._";
	action = INTRO;

begintalknode 28;
	state = 31;
	personality = 243;
	nextstate = 32;
	condition = 1;
	question = "What is your job?";
	text1 = "_Herdsmaster of Sweon._";

begintalknode 29;
	state = 32;
	personality = 243;
	nextstate = 33;
	condition = 1;
	question = "_Herdsmaster of Sweon._";
		text1 = "_The horses that are stabled here are under my jurisdiction._";

begintalknode 30;
	state = 33;
	personality = 243;
	nextstate = 34;
	condition = 1;
	question = "Horses under your jurisdiction";
	text1 = "_Some of them are up for sale, of course, if that is what you wish._";

begintalknode 31;
	state = 34;
	personality = 243;
	nextstate = 35;
	condition = 1;
	question = "Horses for Sale";
	text1 = "_1200 per purchase._ He smiles thinly.";

begintalknode 32;
	state = 35;
	personality = 243;
	nextstate = -1;
	condition = 1;
	question = "Purchase Horses";
	text1 = "_It is yours then. The stables are next to the inn._";
	text3 = "_I will part with one for no less than 1200._";
	text5 = "There are no horses left.";
	code =
		clear_strings();
		if (coins_amount() >=1200) {
			if (set_horse_range_property(2,4)) {
				add_string(1);
				change_coins(-1 * 1200);
				}
				else add_string(5);
			}
			else add_string(3);
	break;

begintalknode 35;
	state = -1;
	personality = 244;
	nextstate = 41;
	condition = 1;
	question = "Ongen";
	text1 = "Taking large swigs of ale, this soldier doesn't seem to be in a conversational mood.";
	text2 = "_Ongen,_ he mutters.";
	action = INTRO;

begintalknode 36;
	state = 41;
	personality = 244;
	nextstate = 42;
	condition = 1;
	question = "What is your job?";
	text1 = "_What? Why do you care? I command._";

begintalknode 37;
	state = 42;
	personality = 244;
	nextstate = 43;
	condition = 1;
	question = "Command";
	text1 = "_What few soldiers here are._ He looks you up and down. _What are you standing there for? Do you have orders?_";

begintalknode 38;
	state = 43;
	personality = 244;
	nextstate = -1;
	condition = 1;
	question = "Orders";
	text1 = "He frowns, shakes his head, and goes back to his ale.";
	code =
	run_town_script(23);
	break;

begintalknode 41;
	state = -1;
	personality = 245;
	nextstate = 51;
	condition = 1;
	question = "Srendrac";
	text1 = "A burly man stands in the middle of the street, glaring at passers-by.";
	text5 = "He snarls. _Srendrac._";
	action = INTRO;

begintalknode 42;
	state = 51;
	personality = 245;
	nextstate = 52;
	condition = 1;
	question = "What is your job?";
	text1 = "_None of your business, outlanders._";

begintalknode 43;
	state = 52;
	personality = 245;
	nextstate = 53;
	condition = 1;
	question = "Business";
	text1 = "_What part of that did you not understand? It's someone else I'm after._";

begintalknode 44;
	state = 53;
	personality = 245;
	nextstate = 54;
	condition = 1;
	question = "Someone else";
	text1 = "_The filthy sneak._ He turns and stares at a farmer walking past.";
	text2 = "_Can't trust any of them._";

begintalknode 45;
	state = 54;
	personality = 245;
	nextstate = 55;
	condition = 1;
	question = "Filthy sneak";
	text1 = "He shakes his head. _He's not in town anymore. If he was, I'd have his throat in the minute. Reckon I won't see him again._";
	text2 = "Surprised you're still here, he snaps. _What? You want a word?_";

begintalknode 46;
	state = 56;
	personality = 245;
	nextstate = 57;
	condition = 1;
	question = "A word";
	text1 = "_Don't trust anyone out there. Anyone._";

begintalknode 47;
	state = 57;
	personality = 245;
	nextstate = -1;
	condition = 1;
	question = "Don't trust anyone";
	text1 = "Your persistence is clearly bothering him. He sends you off with a violent gesture.";
	action = END_TALK;

begintalknode 50;
	state = -1;
	personality = 249;
	nextstate = 91;
	condition = 1;
	question = "Ongen";
	text1 = "Hiding in a corner of the collapsing building, the commander is not in terribly good shape. His eyes light up in alarm as he sees you.";
	text5 = "_Ongen. Doesn't matter now. And why are you here?_";
	action = INTRO;

begintalknode 51;
	state = 91;
	personality = 249;
	nextstate = 92;
	condition = 1;
	question = "What is your job?";
	text1 = "_I don't know. I just don't know._ His voice carries a slight air of menace.";

begintalknode 52;
	state = 92;
	personality = 249;
	nextstate = 93;
	condition = 1;
	question = "Don't know";
	text1 = "_What? Coming out of the outpost with fire-traps to destroy us?!_ He half-draws his weapon. _But it's over. Never trust._";

begintalknode 53;
	state = 93;
	personality = 249;
	nextstate = -1;
	condition = 1;
	question = "Never trust";
	text1 = "_Just go. Tell your master your ploy succeeded. There will be a reckoning._";
	text2 = "He turns his back.";
	action = END_TALK;

begintalknode 190;
	state = 100;
	personality = 38;
	nextstate = 101;
	condition = 1;
	question = "Immortal Sage give us wisdom to understand these items.";
	text1 = "You seek guidance from above.";
	
begintalknode 191;
	state = 101;
	personality = 38;
	nextstate = 102;
	condition = 1;
	question = "Immortal Sage give us wisdom to understand these items.";
	text1 = "Your items are identified.";
	action = ID 0;
	
begintalknode 192;
	state = 102;
	personality = 38;
	nextstate = -1;
	condition = 1;
	question = "We have all the information we need for now.";
	text1 = "You finish the identification.";
	action = END_TALK;	
	